import Vue from 'vue'
import Vuex from 'vuex'

import mutations from './mutations'
import actions from './actions'
import getters from './getters'

// 安装插件
Vue.use(Vuex)

// 创建 state 对象
const state = {
  currentAdmin : null,
  isLogin: false,
  adminInfo: null
}

// 创建 store 对象
const store = new Vuex.Store({
  state,
  mutations,
  actions,
  getters
})

// 挂载在Vue实例上
export default store